import 'package:json_annotation/json_annotation.dart';

part 'category_item.g.dart';


@JsonSerializable()
class CategoryItem extends Object {

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'description')
  String description;

  @JsonKey(name: 'bgPicture')
  String bgPicture;

  @JsonKey(name: 'bgColor')
  String bgColor;

  @JsonKey(name: 'headerImage')
  String headerImage;

  @JsonKey(name: 'defaultAuthorId')
  int defaultAuthorId;

  @JsonKey(name: 'tagId')
  int tagId;

  CategoryItem(this.id,this.name,this.description,this.bgPicture,this.bgColor,this.headerImage,this.defaultAuthorId,this.tagId,);

  factory CategoryItem.fromJson(Map<String, dynamic> srcJson) => _$CategoryItemFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CategoryItemToJson(this);

}


